import request from "@/utils/request"

export function registerJkjl(mobile, inviterId) {
  return request({
    url: '/api/fx/wx/client/register',
    method: 'post',
    data: {
      phone: mobile,
      inviterId: inviterId
    },
    headers: {
      isToken: false
    },
  })
}

export function getUserAccount(params) {
  return request({
    url: '/api/fx/wx/client/user-account',
    method: 'get',
    params: params
  })
}

export function getUserQrCode(params) {
  return request({
    url: '/api/fx/wx/client/user-qrcode',
    method: 'get',
    params: params
  })
}

export function bindQrCode(data) {
  return request({
    url: '/api/fx/wx/client/bind-qrcode',
    method: 'post',
    data: data,
  })
}

export function submitNextLevel(data) {
  return request({
    url: '/api/fx/wx/client/invite-next-level',
    method: 'post',
    data: data,
  })
}

export function queryUserByMayKey(params) {
  return request({
    url: '/api/fx/wx/client/query-user-by-maykey',
    method: 'get',
    params: params
  })
}

export function queryUserByMobile(params) {
  return request({
    url: '/api/fx/wx/client/query-user-by-mobile',
    method: 'get',
    params: params
  })
}

export function getWechatJsapi(params) {
  return request({
    url: '/api/fx/wx/we-chat/web-jsapi',
    method: 'get',
    params: params
  });
}

export function teamPerformance(params) {
  return request({
    url: '/api/fx/wx/client/team-performance',
    method: 'get',
    params: params,
  })
}

export function applyWithdrawRequest(params) {
  return request({
    url: '/api/fx/wx/client/apply-withdraw',
    method: 'post',
    params: params,
    data: {}
  })
}

export function getWithdrawHistory(params) {
  return request({
    url: '/api/fx/wx/client/withdraw-history',
    method: 'get',
    params: params
  })
}

export function getWechatOpenId(params) {
  return request({
    url: "/api/fx/wx/we-chat/web-openid",
    method: "get",
    params: params
  })
}

//绑定微信
export function bindWeChat(params) {
  return request({
    url: "/api/fx/wx/client/bind-wechat",
    method: "get",
    params: params
  })
}

export function getUserQrCodeById(params) {
  return request({
    url: '/api/fx/wx/client/user-qrcode-by-id',
    method: 'get',
    params: params
  })
}

export function getVipProblem(params) {
  return request({
    url: '/api/fx/wx/client/vip-problem',
    method: 'get',
    params: params
  })
}

export function getVipComment(params) {
  return request({
    url: '/api/fx/wx/client/vip-comment',
    method: 'get',
    params: params
  })
}

export function getWithdrawPayInfo(params) {
  return request({
    url: '/api/fx/wx/client/withdraw-pay-info',
    method: 'get',
    params: params
  })
}

export function getWithdrawLogInfo(params) {
  return request({
    url: '/api/fx/wx/client/withdraw-log-info',
    method: 'get',
    params: params
  })
}
